package com.blue.seata.order.controller;

import com.blue.seata.common.JsonResult;
import com.blue.seata.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author liulei
 * @version 1.0
 */
@RestController
@RequestMapping("test")
public class OrderController {

    @Autowired
    private OrderService service;

    @RequestMapping(value = "create", method = RequestMethod.GET)
    public JsonResult create(@RequestParam("userId") String userId, @RequestParam("code") String code, @RequestParam("count") Integer count) {
        service.createOrder(userId, code, count);
        return JsonResult.ok();
    }
}
